home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Port Scanners / NX.EXE / README.TXT < prev    next >
Encoding:
Text File  |  2000-10-08  |  6.0 KB  |  198 lines

  1. nx - network explorer - copyright 2000 mike janzen
  2. version 0.01
  3. mikejanzen@hotmail.com
  4. mikej.mine.nu
  5.  
  6. nx [options] <hostspec1,hostspec2,...>
  7. nx -p 1-1000,6667,65000- microsoft.com/24   # scan 8bit subnet
  8.  
  9.  
  10.  
  11. [options]
  12.  
  13. -d
  14.  
  15.     Print debugging info.  Use more than once for greater effect.
  16.  
  17. -heart
  18.  
  19.     This tries to make sure that the net is up while the scan is 
  20.     going on.  It does this by pinging microsoft.com:80 and 
  21.     yahoo.com:80. If both of these are down, we assume that the net
  22.     is down, and suspend scaning till it is back up (one heartbeat 
  23.     every 10 seconds).
  24.  
  25. -hosts <number>
  26.  
  27.     The number of hosts to roundrobin at the same time.
  28.     nx will gather <number> unique hosts from your host targets.
  29.     It will then scan the first port from each of these hosts in 
  30.     succession.  Then the second.. then the third...
  31.     This is done to minimize the peak load on the remote networks.
  32.     If you are doing scans across many hosts, make this number higher.
  33.     Default: 1000.
  34.  
  35. -o <outputfile>
  36.  
  37.     Send output to the file.  Note that progress output still goes
  38.     to the screen (via cerr).  This is by design.    
  39.  
  40. -p <portlist>
  41.  
  42.     Specify a list of ports to scan on each host.
  43.     eg -p -30,40-1000,1433,6667,65000-
  44.     Default: 21,23,25,53,79,80,110,119,137,143,443,1433,6667.
  45.  
  46. -prand <portlist>
  47.  
  48.     Same as -p except it scans the ports in random order.
  49.  
  50. -plug
  51.  
  52.     This uses plugins on a specific port.  You can write a dll that
  53.     nx hands off an open socket to.  see the included Id_80.cpp for
  54.     an example.  Only one dll allowed per port.  You specify which
  55.     plugins you want loaded in the plugins.txt file.  I will multi-
  56.     thread this sometime.
  57.  
  58. -socks <number>
  59.         
  60.     The number of connections (sockets) to be attempted in parallel.
  61.     Default: 100.
  62.  
  63. -timeout <seconds>
  64.  
  65.     Specify the timeout in seconds to wait for a tcp connection
  66.     from the host.  
  67.     Default: 5 seconds.
  68.  
  69. -interval <miliseconds>
  70.  
  71.     This the time quantum between consecutive connection attempts.
  72.     Set to -1 for really fast networks and really small timeouts.
  73.  
  74. -v
  75.  
  76.     Print verbose info.  Use more than once for greater effect.
  77.     Particularly, progress info is printed to the screen (only)
  78.     if specified at least once.
  79.  
  80. [hosts]
  81.  
  82.     There are 3 different ways nx can get hosts.
  83.     1) Directly from the commandline
  84.     2) From stdin (just put a dash on the end of the command line)
  85.     3) From an input file (via -i)
  86.  
  87.     hostspecs can include a subnet mask like microsoft.com/24.
  88.     eg 1.2.3.4/24 scans the 256 machines of 1.2.3.*
  89.  
  90. -i <inputfile>
  91.  
  92.     Get hostspecs from this file (one host per line)
  93.  
  94. -
  95.  
  96.     Get hostspecs from stdin
  97.  
  98.  
  99. ======================================================================
  100.  
  101.  
  102. REMARKS
  103.  
  104.  
  105. To maximize performance, adjust the following settings:
  106.  
  107. -interval quantum of time between consecutive connection attempts
  108. -timeout  seconds before a connect attempt fails
  109. -socks    number of concurrent connection attempts
  110.  
  111. Use the following settings 
  112. On ~150k/sec bandwidth and ~100ms latency (cable)
  113. -interval 10
  114. -socks 250
  115. -timeout 5
  116.  
  117. Now, the -interval is determined by your bandwidth.
  118. You don't want too many collisions on your network.
  119.  
  120. Lets say your available bandwidth is 150k/sec.
  121. Then you can push out (150k/sec)/(1.5k/pkt) == 100 pkt/sec
  122. This means the interval needs to be 1/100 sec/pkt == 10ms/pkt.
  123. -interval 10 (the default)
  124.  
  125.  
  126. Now set the -timeout this is determined by your latency.
  127. For internet the default timeout of 5 seconds seems to work good.
  128. For localnet you can drop this a lot (maybe to .3 or less).
  129. For localmachine it can be even lower.
  130. -timeout 5 (the default)
  131.  
  132. The -interval and -timeout together determine -socks.
  133. Set -socks such that it takes ~1/2 the -timeout time to fill
  134. them all up.  For -timeout 5, 1/2 of the time is 2.5 seconds.
  135. 100pkt/sec * 2.5 sec == 250 pkt == 250 socks.
  136. -socks 250 (the default)
  137.  
  138.  
  139. ======================================================================
  140.  
  141.  
  142. PLUGINS
  143.  
  144.  
  145. Plugins allow you to define what happens when nx finds an open port.
  146. The sample Id_80.cpp returns the name of the http server to nx.
  147. Run compile_plugin.bat to compile it.
  148. You need winsock2 (ws2_32.lib) to compile.
  149. (look at the source for further explanation)
  150.  
  151. You tell nx which plugin dlls to load by using the plugins.txt file.
  152. (look there for further explanation)
  153.  
  154. If you want to send me your plugins, email mikejanzen@hotmail.com
  155. and I will put them up on the site mikej.mine.nu.
  156. Include only the single source file.
  157.  
  158.  
  159. =======================================================================
  160.  
  161. Fastest clocked speed: >1000 ports/sec!
  162.  
  163. Machine: celeron400
  164. Network: 10megabit
  165.  
  166. Here's the run:
  167.  
  168. F:\Projects\Portscan\Release>nx -p 1-20000 -hosts 2 -timeout .001 -socks 30 -int
  169. erval -1 ninja sky
  170. Host     ninja Resolves to 10.0.0.21
  171. Host     sky Resolves to 10.0.0.17
  172. Open          10.0.0.21    13 -120ms Daytime (RFC 867)
  173. Open          10.0.0.21     9 -120ms Discard
  174. Open          10.0.0.21     7 -120ms Echo
  175. Open          10.0.0.21    17   10ms Quote of the Day
  176. Open          10.0.0.21    19    0ms Character Generator
  177. Open          10.0.0.21    42  -10ms Host Name Server
  178. Open          10.0.0.17    80  -10ms World Wide Web HTTP
  179. Open          10.0.0.17   135    0ms DCE endpoint resolution
  180. Open          10.0.0.21   135    0ms DCE endpoint resolution
  181. Open          10.0.0.17   139    0ms NETBIOS Session Service
  182. Open          10.0.0.21   139    0ms NETBIOS Session Service
  183. Open          10.0.0.17   443  -10ms http protocol over TLS/SSL
  184. Open          10.0.0.21   445    0ms Microsoft-DS
  185. Open          10.0.0.21   515  -10ms spooler
  186. Open          10.0.0.21  1028  -10ms
  187. Open          10.0.0.21  1027  -10ms
  188. Open          10.0.0.21  1037  -10ms
  189. Open          10.0.0.21  1038   10ms
  190. Open          10.0.0.21  1039    0ms
  191. Open          10.0.0.21  1433    0ms Microsoft-SQL-Server
  192. Open          10.0.0.21  7007    0ms
  193. Open          10.0.0.21  7778    0ms
  194. Finished (no more sockets to process)
  195. Stats 1000.33 ports/sec, 39 sec, 22 open, 0 closed, 39978 timeouts
  196.  
  197.  
  198.